﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using JM.JCY.Common;
using JM.JCY.DataAccess;
using JM.JCY.BusinessEntity;
namespace JM.JCY.BusinessComponent
{
    public class NewsBC : JCYBusinessComponentBase<NewsDA>
    {
        public NewsBC()
            : base(new NewsDA())
        {
        }

        public NewsDataSet.T_AnnouncementDataTable GetNews(string subject, string category, string status, DateTime? startDate, DateTime? endDate)
        {
            return this.DataAccess.GetNews(subject, category, status, startDate, endDate);
        }

        public void UpdateNews(NewsDataSet.T_AnnouncementDataTable dt)
        {
            this.DataAccess.UpdateNews(dt);
        }

        public NewsDataSet.T_NewsDataTable GetNewsForHome(string category, int count)
        {
            return this.DataAccess.GetNewsForHome(category, count);
        }

        public NewsDataSet.T_AnnouncementDataTable GetNewsById(int newsId)
        {
            return this.DataAccess.GetNewsById(newsId);
        }

        public NewsDataSet.T_AnnouncementDataTable GetSpeechForHome(int count)
        {
            return this.DataAccess.GetSpeechForHome(count);
        }

      
    }
}
